import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';

class Loading extends StatelessWidget {
  const Loading({
    super.key,
    this.width,
    this.height,
    this.color,
    this.bgColor,
  });
  final double? width;
  final double? height;
  final Color? color;
  final Color? bgColor;

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: bgColor ?? Colors.black.withOpacity(0.8),
        borderRadius: BorderRadius.circular(8.w),
      ),
      width: width ?? 100.w,
      height: height ?? 100.w,
      child: SpinKitCircle(
        color: color ?? Colors.white,
        size: 50.w,
      ),
    );
  }
}
